﻿using System.Collections.Generic;
using MRGSP.SurveyMaster.Core;
using MRGSP.SurveyMaster.Core.Model;
using MRGSP.SurveyMaster.Core.Service;
using MRGSP.SurveyMaster.Localization;

namespace MRGSP.SurveyMaster.Service.Services
{
    public class QuestionTypeService : IControlTypeService
    {
        public IEnumerable<QuestionType> GetRootTypes()
        {
            yield return new QuestionType {Id = (int) ControlType.Header, Name = MUI.Header};
            yield return new QuestionType {Id = (int) ControlType.Grid, Name = MUI.Grid};
        }

        public IEnumerable<QuestionType> GetChildTypes()
        {
            yield return new QuestionType { Id = (int)ControlType.Checkbox, Name = MUI.Checkbox };
            yield return new QuestionType { Id = (int)ControlType.Radio, Name = MUI.Radio };
            yield return new QuestionType { Id = (int)ControlType.Textbox, Name = MUI.Textbox};
            yield return new QuestionType { Id = (int)ControlType.TextArea, Name = "Text Area"};
        }
    }
}